<{extend name="public/layout"}>




<{block name="content"}>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1></h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<{:url('/admin/index/index')}>">首页</a></li>
                        <li class="breadcrumb-item"><a href="#">其他功能</a></li>
                        <li class="breadcrumb-item active">留言反馈</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">


            <div class="card">
                <div class="card-header">
                    <form action="<{:url()}>">
                        <div class="form-row ">

                            <div class="col-auto">
                                <input name="keyword"  type="text" class="form-control " placeholder="UID或者账号" value="<{$Request.param.keyword?$Request.param.keyword:''}>">
                            </div>

                            <div class="col-auto">
                                <button type="submit" class="btn btn-primary mb-2 "><i class="fas fa-search"></i></button>
                                <a  href="<{:url()}>"  class="btn btn-default mb-2 bs-left-30" title="重置"><i class="fas fa-history"></i></a>

                            </div>
                        </div>
                    </form>
                </div>

                <div class="card-body">
                    <table id="my_table" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>类型</th>
                            <th>状态</th>
                            <th>用户</th>
                            <th>内容</th>
                            <th>时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <{if !empty($data)}>
                        <{foreach $data as $item}>
                        <tr>
                            <td ><{$item.category}></td>
                            <td>
                                <{$item.statusDesc}>
                            </td>
                            <td>
                                <a href="<{:url('/admin/user.index/index',['keyword'=>$item.uid])}>"><{$item.user.account}></a>
                            </td>
                            <td>
                                <{if !empty($item.imgs)}>
                                <{foreach $item.imgs as $key=> $img}>

                                <a href="<{$img}>?text=12" data-toggle="lightbox" data-title=" <{$item.content}>" data-gallery="gallery">
                                    <img src="<{$img}>" alt="图片" width="50px" class="img-fluid mb-2">
                                </a>
                                <{/foreach}>
                                <br>
                                <{/if}>
                                <{$item.content}>
                            </td>

                            <td>
                                <{$item.add_time|date="Y-m-d H:i:s",###}>
                            </td>
                            <td>

                                <{if $item.status==0}>
                                <span class="btn btn-success btn-xs" onclick="set_status(this)" data-id="<{$item.id}>"title="改成已处理">处理</span>
                                <{/if}>
                                <span class="btn btn-danger btn-xs del-data bs-left-10" onclick="del(this)" data-id="<{$item.id}>" title="删除"><i class="fas fa-trash"></i></span>
                            </td>

                        </tr>
                        <{/foreach}>
                        <{/if}>



                        </tbody>
                        <tfoot>


                        </tfoot>
                    </table>
                </div>
                <div class="card-footer">
                    <{$page?$page->render():''}>
                </div>
                <!-- /.card-body -->
            </div>
        </div>



    </section>
    <!-- /.content -->
</div>
<{/block}>
<{block name="script"}>

<script src="/static/adminlte/plugins/chart.js/Chart.min.js"></script>
<!-- Sparkline -->
<script src="/static/adminlte/plugins/sparklines/sparkline.js"></script>
<!-- JQVMap -->
<script src="/static/adminlte/plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="/static/adminlte/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<!-- jQuery Knob Chart -->
<script src="/static/adminlte/plugins/jquery-knob/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="/static/adminlte/plugins/moment/moment.min.js"></script>
<script src="/static/adminlte/plugins/daterangepicker/daterangepicker.js"></script>

<!-- Tempusdominus Bootstrap 4 -->
<script src="/static/adminlte/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>

<!-- echarts -->
<script src="/static/adminlte/plugins/echarts/echarts.min.js"></script>


<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));
    var dataX = [<{$data.tongji.x}>];
    var dataY = [<{$data.tongji.order}>];
    // 指定图表的配置项和数据
    var option = {
        title : {
            text: '收入金额',
            subtext: '单位(元)'
        },
        tooltip : {
            trigger: 'axis'
        },
        legend: {
            data:['订单量']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            show : true,
            feature : {
                dataView : {show: true, readOnly: false},
                magicType : {show: true, type: ['line', 'bar','tiled','stack']},
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        calculable : true,
        xAxis : [
            {
                type : 'category',
                data : dataX,
                name:'日'
            }
        ],
        yAxis : [
            {
                type : 'value'
            }
        ],
        series : [
            {
                name:'交易',
                type:'bar',
                data:dataY,
                /*markLine : {
                    data : [
                        {type : 'average', name: '平均值'}
                    ]
                },*/
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        color:'#cc1828'
                    }
                },
                color:'rgba(66,255,38,0.83)',
            },
        ]
    };


    //清空画布，防止缓存
    myChart.clear();
    //使用刚指定的配置项和数据显示图表。
    myChart.setOption(option,true);
</script>
<{/block}>

